<template>
  <ToolboxWindow title="Flow widget data" :show="props.show" :width="350">
    <pre>{{ JSON.stringify(props.dataInfo, null, 2) }}</pre>
    <el-divider />
    <pre
      v-for="(c, i) in props.result"
      :style="{
        color:
          c.type == 'danger'
            ? 'var(--el-color-danger)'
            : c.type == 'warning'
            ? 'var(--el-color-warning)'
            : 'var(--el-color-info)',
      }">{{ JSON.stringify(c, null, 2) }}<el-divider  v-if="i<result.length-1" /></pre>
  </ToolboxWindow>
</template>

<script setup>
import ToolboxWindow from "@/components/ToolboxWindow/index.vue";
const props = defineProps({
  show: {
    type: Boolean,
    default: false,
  },
  result: {
    type: Array,
    default: [],
  },
  dataInfo: {
    type: Object,
    defaylt: null,
  },
});
</script>
